<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%
request.setAttribute("toolsPath", request.getContextPath()  + ApplicationComponent.URI_TOOLS);
request.setAttribute("servicesPath", request.getContextPath()  );
request.setAttribute("resourcesPath", request.getContextPath()  + "/resources");
%>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


<%@page import="org.tools.wstt.reference.ApplicationComponent"%><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<title>WSST - <c:out value="${title}" /></title>
		<script type="text/javascript"><!--
		(function(){function a(){this.t={};this.tick=function(c){this.t[c]=(new Date).getTime()};this.tick("start")}var b=new a;window.jstiming={Timer:a,load:b};if(window.external&&window.external.pageT)window.jstiming.pt=window.external.pageT;})();
		 
		var _tocPath_ = '';
		var codesite_token = '';
		var logged_in_user_email = '';
		//--></script> 
		<link type="text/css" href="<c:out value="${resourcesPath}" />/css/codesite.pack.04102009.css" rel="stylesheet" />
		<script type="text/javascript" src="<c:out value="${resourcesPath}" />/js/codesite_head.pack.04102009.js" ></script>
		<style type="text/css">
			#gc-pagecontent h2 {
				border-bottom: 1px solid;
				border-color: #3366CC;}
			a:visited {color: #00C;}
			.alert{color: red;}
			.ok{color: blue;}
		</style>
	</head>
	<body class="gc-documentation">
		<div id="gb"> 
			 <span>
			 	<% if(request.getUserPrincipal() != null) { %>
					<strong>Logged as : <code><%=request.getUserPrincipal().getName()%></code></strong>
				<% } else { %>
					Not currently logged in.
					|
				    <a href="<c:out value="${toolsPath}" />/profile">
				    	<span style="text-decoration:underline">Go to Login page.</span>
				    </a>
				<% } %>
				<br />
				<% if(request.getSession(false)!= null) { %>
					Session Id : <%=request.getSession().getId()%>
				<% } else { %>
					No Session active.
				<% } %>
			 </span>
		</div>
		 
		<div id="gc-container">
			<a id="top"></a>
			<div id="skipto">
			  <a href="#gc-pagecontent">Skip to page content</a>
			  <a href="#gc-toc">Skip to main navigation</a>
			</div>
			
			<div id="gc-header">
			</div> <!-- end gc-header -->
			
			<div id="codesiteContent">
				<a id="gc-topnav-anchor"></a>
		       	<div id="gc-topnav">
				  <h1>WSTT</h1>
				  <ul id="docs" class="gc-topnav-tabs">
				    <li id="home_link">
				      <a href="<c:out value="${toolsPath}" />/about" title="WSTT home page">Home</a>
				    </li>
				  </ul> 
				</div>
				
				<div class="g-section g-tpl-170"> 
					<div class="g-unit g-first" id="gc-toc"> 
						<ul> 
							<li>
						  		<h2>General</h2> 
								<ul>
									<li><a href="<c:out value="${toolsPath}" />/system">View System informations</a></li>
									<li><a href="<c:out value="${toolsPath}" />/request">View Incoming HTTP Request in details</a></li>
								</ul>
							</li>
						</ul>
						<div class="line"></div>
						<ul> 
							<li>
						  		<h2>Tools</h2> 
						    	<ul> 
						      		<li><a href="<c:out value="${toolsPath}" />/response_config">Simulate HTTP Responses</a></li>
						    		<li><a href="<c:out value="${toolsPath}" />/session">Test the Behavior of Sessions</a></li>
						      		<li><a href="<c:out value="${toolsPath}" />/proxy_config">Configure an HTTP Proxy</a></li>
						    		<li><a href="<c:out value="${toolsPath}" />/fetch_url">Fetch HTTP URL</a></li>
						    		<li><a href="<c:out value="${toolsPath}" />/probe_remote">Probe Remote Servers</a></li>
						    	</ul>
							</li>
						</ul>
						<% if(getServletConfig().getServletContext().getServerInfo().indexOf("WebLogic") != -1) { %>
						<div class="line"></div>
						<ul> 
							<li>
						  		<h2>Platform Specific : Weblogic Server</h2> 
						    	<ul> 
						      		<li><a href="<c:out value="${toolsPath}" />/wl/infos">Server Informations</a></li>
						      		<% if(getServletConfig().getServletContext().getServerInfo().indexOf("8.1") != -1) { %>
						      		<li><a href="<c:out value="${toolsPath}" />/wl/8/sessions">Sessions Monitoring</a><sup class="new">for&nbsp;Admins&nbsp;!</sup></li>
						      		<% } %>
						      		<% if(getServletConfig().getServletContext().getServerInfo().indexOf("10") != -1) { %>
						      		<li><a href="<c:out value="${toolsPath}" />/wl/10/sessions">Sessions Monitoring</a><sup class="new">for&nbsp;Admins&nbsp;!</sup></li>
						      		<% } %>
						    	</ul>
							</li>
						</ul>
						<% } %>
						<% if(getServletConfig().getServletContext().getServerInfo().indexOf("Google App Engine") != -1) { %>
						<div class="line"></div>
						<ul> 
							<li>
						  		<h2>Platform Specific : Google App Engine</h2> 
						    	<ul> 
						      		<li><a href="https://appengine.google.com/dashboard?&app_id=<%=request.getServerName().replaceAll(".appspot.com","") %>">Go to dashboard</a></li> 		
						    	</ul>
							</li>
						</ul>
						<%} %>
					</div>
					<div class="g-unit" id="gc-pagecontent">
						<h1 class="page_title"><c:out value="${title}" /></h1>
		
